<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//set up the environment
error_reporting(E_ALL);
if (version_compare(phpversion(), "5.3.0", "<") == true)
    die("Only accept above PHP version 5.3.0");
ini_set('display_errors', true);
date_default_timezone_set('Europe/London');

//set library path of php.ini and library path of this project to include_path
define('DIRSEP', DIRECTORY_SEPARATOR);
$rootDir = realpath(dirname(dirname(__FILE__)));
var_dump($rootDir);
set_include_path($rootDir . DIRSEP . 'library' . PATH_SEPARATOR . get_include_path());
echo get_include_path();

//setup controller
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Debug');
Zend_Loader::loadClass('Zend_Controller_Front');

$frontCtl = Zend_Controller_Front::getInstance();
$frontCtl->throwExceptions(true);
$frontCtl->setControllerDirectory('../application/controllers');

//run
$frontCtl->dispatch();
?>
